package svmc.stp.hoaitt;

import java.util.ArrayList;
import java.util.Collections;

public class LibraryTest {

	public static void main(String[] args) {
		Book b1 = new Book("Mat biec", "Nguyen Nhat Anh", 1);
		Book b2 = new Book("Nang Anna...", "Alex", 2);
		Book b3 = new Book("Thep da toi the day", "Lenin", 3);
		Book b4 = new Book("Tuyen tap truyen ngan cua Nam Cao", "Nam Cao", 4);
		Book b5 = new Book("Gio xuan", "An An", 5);
		Book b6 = new Book("Goi song", "Xuan Quynh", 6);
		Book b7 = new Book("Eff", "Both", 7);

		ArrayList<Book> test = new ArrayList<Book>();
		test.add(b1);
		test.add(b2);
		test.add(b3);
		test.add(b3);
		test.add(b4);
		test.add(b5);
		test.add(b6);
		test.add(b7);

		Library lbr = new Library(test);

		for (Book book : test) {
			System.out.println(book.toString());
		}

		System.out.println("Action Borrow Book");
		lbr.borrowBook(b6);
		lbr.hintBook();
		lbr.borrowBook(b5);
		
//		System.out.println("======================");
//		System.out.println("\nBefore borrow\n");
//		System.out.println("======================");
		
//		lbr.printBookDoBorrow();
		
		Collections.sort(test);
		for (Book book : test) {
			System.out.println(book.toString());

		}

//		lbr.printBookAvailable();
		

	}

}
